package com.gitee.cui.springcloud.order.controller;

import javax.annotation.Resource;

import com.gitee.cui.springcloud.order.domain.CommonResult;
import com.gitee.cui.springcloud.order.domain.Order;
import com.gitee.cui.springcloud.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单controller
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-26 12:27
 **/
@RestController
@Slf4j
@RequestMapping("/order")
public class OrderController {

	@Resource
	private OrderService orderService;

	@GetMapping("/create")
	public CommonResult create(Order order) {
		orderService.create(order);
		return new CommonResult(200, "订单创建成功");
	}
}
